How to build a complete, real-world application from scratch with Ruby on Rails step by step.
A lot of Ruby code is "magic". We'll explain the magic and see how it works using the powerful tools Ruby gives us.
Accept subscription and one-time payments with Stripe in your Rails apps
Expert advice on keeping Rails apps organized and fast.
Cheap, easy hosting for Ruby and Rails apps.
Launch your product business way faster with our SaaS template.
A weekly podcast on web development and building products with Ruby, Rails, Javascript, and more.
A few of the Open Source projects we do at GoRails.
Build a Ruby on Rails app in 48 hours with us.
Help Junior developers get hired by sharing small projects to build their resume with paid work.
Find your next Ruby on Rails Job.
In this episode, we will dip our toes into an Object Oriented Design Principle known as the Law of Demeter. We will then look at an example of a small violation of this principle followed by a couple of solutions to remedy the issue.
We look at using the built in SimpleDelegator class to easily create decorators for objects.
Rails uses the MVC Pattern. This isn't as scary as it sounds. It's basically a design architecture that gives you 3 primary buckets to help you organize your code.
Building a gem can be complicated. Often times you're writing abstract, meta code so it can be used flexibly in situations you'll never imagine. We'll talk about the architecture and design of the noticed gem and how it all works.
Dependency Injection is a common technique for making your code more flexible and testable by removing strict dependencies upon other classes, modules, and other types of dependencies in your code
Abstractions should not depend upon details. Details should depend upon abstractions
The Interface Segregation Principle states that no client should be forced to depend on methods it does not use
Subclasses should add to a base classes behavior, not replace it
Software entities should be open for extension but closed for modification
A class should have only a single responsibility
See how you can use a form object to improve the way you implement custom and complex forms in Rails
Implement the decorator pattern with the Draper gem in your Rails application
Learn what the Decorator design pattern does and how to implement it from scratch
Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.
We care about the protection of your data. Read our Privacy Policy.